/**
 * File: cpu
 * Desc: custom cpu widget
 * Author: JakeYang
 * Log: 2015-08-18
 */

#ifndef __CPU_H__
#define __CPU_H__

#include <gtk/gtk.h>
#include <cairo/cairo.h>

G_BEGIN_DECLS

/*定义类型检测*/
#define GTK_CPU(obj) GTK_CHECK_CAST(obj, gtk_cpu_get_type(), GtkCpu)

#define GTK_CPU_CLASS(klass) GTK_CHECK_CLASS_CAST(klass, gtk_cpu_get_type(), GtkCpuClass)

#define GTK_IS_CPU(obj) GTK_CHECK_TYPE(obj, gtk_cpu_get_type())

typedef struct _GtkCpu GtkCpu;

typedef struct _GtkCpuClass GtkCpuClass;

struct _GtkCpu {
    GtkWidget widget;
    gint sel;
};

struct _GtkCpuClass {
    GtkWidgetClass parent;
};

GtkType gtk_cpu_get_type();

void gtk_cpu_set_sel(GtkCpu *cpu, gint sel);

GtkWidget *gtk_cpu_new();

G_END_DECLS
#endif /* __CPU_H__ */
